/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bo;
import dto.CustomerDTO;
import java.sql.SQLException;
import java.util.ArrayList;
import mapper.CustomerMapper;

/**
 *
 * @author Tam Nguyen
 */
public class Customer_BUS {
    public ArrayList<dto.CustomerDTO> LoadCustomer() throws SQLException
    {
        mapper.CustomerMapper mapper= new CustomerMapper();
        return (mapper.LoadCustomer());
    }
    public boolean AddCustomer(CustomerDTO cus) throws SQLException
    {
        mapper.CustomerMapper mapper = new CustomerMapper();
        return (mapper.AddCustomer(cus));
    }
    public boolean DeleteCustomer(int cusid) throws SQLException
    {
        mapper.CustomerMapper mapper = new CustomerMapper();
        return (mapper.DeleteCustomer(cusid));
    }
    public boolean UpdateCustomer(CustomerDTO cus) throws SQLException
    {
        mapper.CustomerMapper mapper = new CustomerMapper();
        return (mapper.UpdateCustomer(cus));
    }
    public boolean AddUser(CustomerDTO cus) throws SQLException
    {
        mapper.CustomerMapper mapper = new CustomerMapper();
        return (mapper.AddUser(cus));
    }
    public boolean DeleteUser(int cusid) throws SQLException
    {
        mapper.CustomerMapper mapper = new CustomerMapper();
        return (mapper.DeleteUser(cusid));
    }
    public boolean UpdateUser(CustomerDTO cus) throws SQLException
    {
        mapper.CustomerMapper mapper = new CustomerMapper();
        return (mapper.UpdateUser(cus));
    }

}
